package com.example.springbootwebserviceproxy.util;

import cn.hutool.core.util.StrUtil;
import com.example.springbootwebserviceproxy.exception.SOAPProxyException;

import java.util.Objects;

/**
 * Assert.
 *
 * @author <a href='mailto:likeguo@apache.com'> likeguo </a>
 */
public final class Assert {
    
    private Assert() {
    }
    
    public static void notBack(final String str, final String message) {
        if (StrUtil.isBlank(str)) {
            throw new SOAPProxyException(message);
        }
    }
    
    public static void notNull(final Object obj, final String message) {
        if (Objects.isNull(obj)) {
            throw new SOAPProxyException(message);
        }
    }
    
}
